package com.shenmazong.servereduresume.controller;

import com.shenmazong.servereduresume.dto.TbSrwp;
import com.shenmazong.servereduresume.service.TbSrwpService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import com.shenmazong.vo.ListParamVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 简历模板表
 */
@RestController
@RequestMapping("srwp")
//@CrossOrigin
public class TbSrwpController {
    @Autowired
    private TbSrwpService tbSrwpService;

    @PostMapping("listSrwpById")
    public ResultResponse listSrwpById(@RequestBody ListParamVo listParamVo){
        return tbSrwpService.listSrwpById(listParamVo);
    }

    //admin审核
    @PostMapping("findAllSrwpAdmin")
    public ResultResponse findAllSrwpAdmin(@RequestBody ListParamVo listParamVo){
        return tbSrwpService.findAllSrwpAdmin(listParamVo);
    }

    @PostMapping("findAllSrwpStudent")
    public ResultResponse findAllSrwpStudent(@RequestBody ListParamVo listParamVo){
        return tbSrwpService.findAllSrwpStudent(listParamVo);
    }

    @PostMapping("saveSrwp")
    public ResultResponse saveSrwp(@RequestBody TbSrwp tbSrwp){
        return tbSrwpService.saveSrwp(tbSrwp);
    }

    @PostMapping("updateSrwp")
    public ResultResponse updateSrwp(@RequestBody TbSrwp tbSrwp){
        return tbSrwpService.updateSrwp(tbSrwp);
    }

    @PostMapping("deleteSrwp")
    public ResultResponse deleteSrwp(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSrwpService.deleteSrwp(batchChooseIdVo);
    }

    @PostMapping("auditSrwp")
    public ResultResponse auditSrwp(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSrwpService.auditSrwp(batchChooseIdVo);
    }
}
